Skip to content

Reinstate supplemental API remarks (System.Runtime)#12699

Merged
gewarren merged 6 commits into
dotnet:mainfrom
gewarren:reinstate-remarks-system-runtime
Jun 4, 2026
Merged

Reinstate supplemental API remarks (System.Runtime)#12699
gewarren merged 6 commits into
dotnet:mainfrom
gewarren:reinstate-remarks-system-runtime

Conversation

@gewarren
Copy link
Copy Markdown
Contributor

@gewarren gewarren commented Jun 3, 2026

Contributes to #12613.

Also removes .NET Framework remarks.

@gewarren gewarren marked this pull request as ready for review June 3, 2026 16:48
Copilot AI review requested due to automatic review settings June 3, 2026 16:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reinstates “supplemental API remarks” directly into this repo’s ECMA XML files for several System.Runtime-related APIs (per #12613), replacing the previous pattern of linking out to conceptual documentation. It also adds/relocates snippet assets to support the restored remarks.

Changes:

  • Replaces “Supplemental API remarks…” external links with inlined markdown remarks in multiple xml/ type docs.
  • Updates InternalsVisibleToAttribute docs to point at new snippet paths and adds new snippet projects/files.
  • Adds new snippet project files (C#/VB) to support compilation/validation of the referenced code samples.

Reviewed changes

Copilot reviewed 34 out of 38 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml Inlines previously external supplemental remarks and references snippet files.
xml/System.Runtime.Serialization/XsdDataContractExporter.xml Inlines supplemental remarks content for the exporter.
xml/System.Runtime.Serialization/IExtensibleDataObject.xml Inlines supplemental remarks content for version-tolerant serialization.
xml/System.Runtime.Serialization/DataContractSerializer.xml Inlines supplemental remarks content (includes a .NET Framework partial-trust section that needs adjustment).
xml/System.Runtime.Serialization/DataContractAttribute.xml Inlines supplemental remarks content and guidance for data contracts.
xml/System.Runtime.Loader/AssemblyLoadContext.xml Inlines supplemental remarks content for load contexts.
xml/System.Runtime.InteropServices/SafeHandle.xml Inlines supplemental remarks content for SafeHandle usage and motivation.
xml/System.Runtime.InteropServices/ICustomMarshaler.xml Inlines supplemental remarks content and adds snippet references (includes .NET Framework wording to neutralize).
xml/System.Runtime.InteropServices/ComWrappers.xml Inlines supplemental remarks content describing ComWrappers concepts.
xml/System.Runtime.InteropServices/COMException.xml Inlines supplemental remarks content for COMException handling guidance.
xml/System.Runtime.CompilerServices/RuntimeHelpers.xml Inlines supplemental remarks for RuntimeHelpers.GetHashCode and adds snippet references.
xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml Inlines supplemental remarks and repoints snippet references; includes a minor punctuation fix needed.
snippets/visualbasic/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/Project.vbproj Adds a VB snippet project for ComponentGuaranteesAttribute examples.
snippets/visualbasic/System.Runtime.Versioning/ComponentGuaranteesAttribute/Overview/apply1.vb Adds VB snippet source for the ComponentGuaranteesAttribute examples.
snippets/visualbasic/System.Runtime.InteropServices/ICustomMarshaler/Overview/source.vb Adds VB snippet source for ICustomMarshaler remarks.
snippets/visualbasic/System.Runtime.InteropServices/ICustomMarshaler/Overview/Project.vbproj Adds a VB snippet project for ICustomMarshaler examples.
snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/Project.vbproj Adds a VB snippet project for RuntimeHelpers.GetHashCode examples.
snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/gethashcodeex1.vb Adds VB snippet source for RuntimeHelpers.GetHashCode examples.
snippets/visualbasic/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/UtilityLib/utilitylib.vb Adds VB UtilityLib snippet source (missing a corresponding Project.vbproj).
snippets/visualbasic/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/friend2.vb Removes the old VB Friend2 snippet location (relocated under Overview/Friend/).
snippets/visualbasic/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/multiple2.vb Adds VB snippet showing multiple friend assemblies via one assembly block.
snippets/visualbasic/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/multiple1.vb Adds VB snippet showing multiple friend assemblies via multiple attributes.
snippets/visualbasic/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/Friend2.vbproj Adds a VB snippet project for friend-assembly examples.
snippets/visualbasic/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/friend2.vb Adds relocated VB Friend2 snippet (currently has the key call commented out).
snippets/visualbasic/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/friend1.vb Updates/relocates VB Friend1 snippet content.
snippets/visualbasic/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/assembly1.vb Adds relocated VB Assembly1 snippet content for signed-assembly example.
snippets/csharp/System.Runtime.InteropServices/ICustomMarshaler/Overview/source.cs Adds C# snippet source referenced by the restored ICustomMarshaler remarks.
snippets/csharp/System.Runtime.InteropServices/ICustomMarshaler/Overview/Project.csproj Adds a C# snippet project for ICustomMarshaler examples.
snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/GetHashCode/gethashcodeex1.cs Adds C# snippet source referenced by the restored RuntimeHelpers remarks.
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/UtilityLib/UtilityLib.csproj Adds a C# UtilityLib snippet project for InternalsVisibleTo examples.
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/UtilityLib/utilitylib.cs Adds C# UtilityLib snippet source for InternalsVisibleTo examples.
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/friend2.cs Removes the old C# Friend2 snippet location (relocated under Overview/Friend/).
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/multiple2.cs Adds C# snippet showing multiple friend assemblies in one attribute list.
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/multiple1.cs Adds C# snippet showing multiple friend assemblies via multiple attributes.
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/Friend2.csproj Adds a C# snippet project for friend-assembly examples (needs a ProjectReference).
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/friend2.cs Adds relocated C# Friend2 snippet (needs compile + example correctness fixes).
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/friend1.cs Updates/relocates C# Friend1 snippet content (had a compile break due to renaming).
snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/assembly1.cs Adds relocated C# Assembly1 snippet content for signed-assembly example.
Comments suppressed due to low confidence (1)

snippets/csharp/System.Runtime.CompilerServices/InternalsVisibleToAttribute/Overview/Friend/friend1.cs:29

  • The snippet renames the helper type to FileUtilities1, but Main still calls FileUtilities.AppendDirectorySeparator, which will fail to compile. Update the call site to use the new type name (or keep the original type name consistent across the snippet).

Comment thread xml/System.Runtime.Serialization/DataContractSerializer.xml Outdated
Comment thread xml/System.Runtime.InteropServices/ICustomMarshaler.xml Outdated
Comment thread xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml Outdated
Copy link
Copy Markdown
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM @gewarren

I had a couple code suggestions, and then it's ready.

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
@gewarren gewarren enabled auto-merge (squash) June 4, 2026 15:14
@gewarren gewarren merged commit b7d3777 into dotnet:main Jun 4, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants